﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MyAuthCore.Tools
{ 
    public class IDHelper
    {
        /// <summary>
        /// 业务代码-时间戳-随机数
        /// </summary>
        /// <returns></returns>
        public static string GetTimeUUID()
        {
            Random random = new Random();
            return string.Format("K-{0}-{1}", DateTime.Now.ToString("yyMMddHHmmsss"), random.Next(1000, 10000));
        }
        /// <summary>
        /// 获得系统的Guid
        /// </summary>
        /// <returns></returns>
        public static string GetSysUUID()
        {
           return Guid.NewGuid().ToString();
        }
    }
}
